package com.ms.jsf;

import javax.faces.event.ActionEvent;
import javax.servlet.ServletException;
import java.io.IOException;

/**
 * User: gmc
 * Date: 23/03/13
 */
public abstract class CrudBeanBase<Filter, Result> extends JsfBeanBase {

    public abstract void findAction(ActionEvent actionEvent);

    public abstract void cleanAction(ActionEvent actionEvent);

    public abstract void showNewDialogAction(ActionEvent actionEvent);

    public abstract void showNewPageAction(ActionEvent actionEvent)  throws IOException, ServletException;

    public abstract void showEditDialogAction(ActionEvent actionEvent);

    public abstract void deleteAction(ActionEvent actionEvent);

    public abstract void saveAction(ActionEvent actionEvent);

    public abstract void validateExistSelectedRow(ActionEvent actionEvent);

    public abstract void validateExistSelectedRows(ActionEvent actionEvent);

    protected abstract void onFindAction();

    protected abstract void onCleanAction();

    protected abstract void createVmForCreation();

    protected abstract void createVmForEdition(Result selectedRow);

    protected abstract void onSaveAction();

    protected abstract void onDeleteAction(Result selectedRow);

}
